<!DOCTYPE html>
<html>
<head>
    {include file="../application/common/header.html" /}
    <style>
        .datagrid-btable tr{height: 30px;}
    </style>
</head>

<body>
	<div id="teacher_zczrtb">
        <form id="teacher_zczrForm" class="m5">
            <?php echo currTerm()["termName"]?>
            <select class="form-control1" name="grade" id="grade"></select>
            在校状态：
            <select class="form-control1" name="schoolStatus" id="schoolStatus">
                <option value="">请选择</option>
                <option value="0">在校</option>
                <option value="1">调出</option>
                <option value="2">休假</option>
                <option value="3">离职</option>
            </select>
            教师姓名：
            <input class="form-control1" type="text" name="teacherName" id="teacherName">
            <a class="easyui-linkbutton l-btn l-btn-small" data-options="iconCls:'icon-search'" onclick="searchForm('teacher_zczr')">查询</a>
            <a class="easyui-linkbutton l-btn l-btn-small" data-options="iconCls:'icon-clear'" onclick="resetForm('teacher_zczr')">重置</a><br/>
        </form>
    </div>
    <table id="teacher_zczrdg">
    	<thead>
			<tr>
                <th data-options="field:'姓名',title:'姓名',width:15"></th>
                <th data-options="field:'离校学期ID',title:'在校状态',width:15,sortable:true,editor:{type:'combobox',options:{required:true,data:[{'text':'在校','value':'0', selected: true},{'text':'调出','value':'1'},{'text':'休假','value':'2'},{'text':'离职','value':'3'}]}},formatter:function(value,row,index){
                    if(value > 0) {
                        var text = '';
                        if(value == 1) text = '调出';
                        else if(value == 2) text = '休假';
                        else if(value == 3) text = '离职';
                        return '<span style=\'color:red;\'>'+text+'</span>';
                    } else {
                        return '在校';
                    }
                }"></th>
                <th data-options="field:'年级号',title:'年级号',width:15,editor:{type:'combobox',options:{
                    valueField:'value',
                    textField:'text',
                    method:'get',
                    url: '/compent/Util/gradeList',
                    editable:false
                }},formatter:function(value,row,index){
                    return row.gradeName;
                }"></th>
                <th data-options="field:'任教学科ID',title:'学科名称',width:15,editor:{type:'combobox',options:{
                    valueField:'value',
                    textField:'text',
                    method:'get',
                    url: '/compent/Util/subjectList',
                    editable:false
                }},formatter:function(value,row,index){
                    return row.subjectName;
                }"></th>
                <th data-options="field:'职位',title:'职位',width: 20,editor:{type:'combobox',options:{
                    valueField:'ID',
                    textField:'POSITION',
                    groupField:'DEPART',
                    method:'get',
                    url: '/compent/Util/organizeDepart',
                    multiple:true,
                    editable:false
                }},formatter(value,row,index) {
                    return '<span class=\'note\' title=\''+row.positionText+'\'>'+ row.positionText + '</span>';
                }"></th>
			</tr>
		</thead>
        
    </table>

    <script type="text/javascript">
        $(function(){
            var url = "/teacher/teacher_zczr";
            initDatagridAdmin("teacher_zczr",url,0,0,1,1,0);
            initGrade("teacher_zczr");
        })
    </script>
</body>
</html>